package com.ruoyi.medical.clinic.service.impl;

import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.medical.clinic.mapper.ClinicMapper;
import com.ruoyi.medical.clinic.domain.Clinic;
import com.ruoyi.medical.clinic.service.IClinicService;

/**
 * 医务室信息Service业务层处理
 * 
 * @author wad
 * @date 2022-04-06
 */
@Service
public class ClinicServiceImpl implements IClinicService 
{
    @Autowired
    private ClinicMapper clinicMapper;

    /**
     * 查询医务室信息
     * 
     * @param clinicId 医务室信息主键
     * @return 医务室信息
     */
    @Override
    public Clinic selectClinicByClinicId(Long clinicId)
    {
        return clinicMapper.selectClinicByClinicId(clinicId);
    }

    /**
     * 查询医务室信息列表
     * 
     * @param clinic 医务室信息
     * @return 医务室信息
     */
    @Override
    public List<Clinic> selectClinicList(Clinic clinic)
    {
        return clinicMapper.selectClinicList(clinic);
    }


    @Override
    public List<Clinic> selectClinicList2(){
        return clinicMapper.selectClinicList2();
    }

    /**
     * 新增医务室信息
     * 
     * @param clinic 医务室信息
     * @return 结果
     */
    @Override
    public int insertClinic(Clinic clinic)
    {
        return clinicMapper.insertClinic(clinic);
    }

    /**
     * 修改医务室信息
     * 
     * @param clinic 医务室信息
     * @return 结果
     */
    @Override
    public int updateClinic(Clinic clinic)
    {
        return clinicMapper.updateClinic(clinic);
    }

    /**
     * 批量删除医务室信息
     * 
     * @param clinicIds 需要删除的医务室信息主键
     * @return 结果
     */
    @Override
    public int deleteClinicByClinicIds(Long[] clinicIds)
    {
        return clinicMapper.deleteClinicByClinicIds(clinicIds);
    }

    /**
     * 删除医务室信息信息
     * 
     * @param clinicId 医务室信息主键
     * @return 结果
     */
    @Override
    public int deleteClinicByClinicId(Long clinicId)
    {
        return clinicMapper.deleteClinicByClinicId(clinicId);
    }
}
